﻿<%@ Page Title="" Language="C#" MasterPageFile="~/homepaged.master" AutoEventWireup="true"
    CodeBehind="domaincategory.aspx.cs" Inherits="Nhom14_HTTTHD_BuyMe.domaincategory" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TopBanner" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div class="outer">
        <telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableTheming="True">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
                </asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
                </asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
                </asp:ScriptReference>
            </Scripts>
        </telerik:RadScriptManager>
        <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1"
                    AllowPaging="True" runat="server" AllowSorting="True" 
            CellSpacing="0" GridLines="None">
                    <PagerStyle Mode="NextPrevAndNumeric" />
            <MasterTableView TableLayout="Fixed" AutoGenerateColumns="False" DataKeyNames="id">
                <ItemTemplate>
                    <table width="100%" cellpadding="10" cellspacing="0" border="0">
                        <tr class="hilite2">
                            <td>
                                <a href='<%# Eval("domain_url") %>' target="_blank" ><%# Eval("domain_url") %></a>
                            </td> 
                            <td>
                                 <a href='<%# "username.aspx?id="+ Eval("id") %>'><%# Eval("username")%></a>
                            </td> 
                            <td>
                                 <a href='<%# "detaildomain.aspx?id="+ Eval("id") %>'><%# Eval("description")%></a>
                            </td> 
                            <td>
                                 <a href='<%# "detaildomain.aspx?id="+ Eval("id") %>'><%# Eval("page_view")%></a>
                            </td>
                            <td>
                                 <a href='<%# "detaildomain.aspx?id="+ Eval("id") %>'><%# Eval("asking_price")%></a>
                            </td>
                            <td>
                                 <a href='<%# "detaildomain.aspx?id="+ Eval("id") %>'><%# Eval("date_started")%></a>
                            </td>  
                            <td>
                                 <a href='<%# "detaildomain.aspx?id="+ Eval("id") %>'><%# Eval("stats_available")%></a>
                            </td>    
                        </tr>
                    </table>
                </ItemTemplate>
                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="id" DataType="System.Int32" 
                        FilterControlAltText="Filter id column" HeaderText="id" ReadOnly="True" 
                        SortExpression="id" UniqueName="id">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="domain_url" 
                        FilterControlAltText="Filter domain_url column" HeaderText="domain_url" 
                        SortExpression="domain_url" UniqueName="domain_url">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="username" 
                        FilterControlAltText="Filter username column" HeaderText="username" 
                        SortExpression="username" UniqueName="username">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="description" 
                        FilterControlAltText="Filter description column" HeaderText="description" 
                        SortExpression="description" UniqueName="description">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="page_view" 
                        FilterControlAltText="Filter page_view column" HeaderText="page_view" 
                        SortExpression="page_view" UniqueName="page_view">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="asking_price" 
                        FilterControlAltText="Filter asking_price column" HeaderText="asking_price" 
                        SortExpression="asking_price" UniqueName="asking_price">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="date_started" DataType="System.DateTime" 
                        FilterControlAltText="Filter date_started column" HeaderText="date_started" 
                        SortExpression="date_started" UniqueName="date_started">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="stats_available" 
                        FilterControlAltText="Filter stats_available column" 
                        HeaderText="stats_available" SortExpression="stats_available" 
                        UniqueName="stats_available">
                    </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <FilterMenu EnableImageSprites="False">
                <WebServiceSettings>
                    <ODataSettings InitialContainerName="">
                    </ODataSettings>
                </WebServiceSettings>
            </FilterMenu>
            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                <WebServiceSettings>
                    <ODataSettings InitialContainerName="">
                    </ODataSettings>
                </WebServiceSettings>
            </HeaderContextMenu>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:WebsitebrokenConnection %>"
            SelectCommand="SELECT domain.id, domain.domain_url, account.username, domain.description, domain.page_view, domain.asking_price, domain.date_started, domain.stats_available FROM domain INNER JOIN domain_category ON domain.id = domain_category.id_domain INNER JOIN category ON domain_category.id_category = category.id INNER JOIN account ON domain.id_account = account.id WHERE (category.id = @id) AND (domain.status = 1) ORDER BY domain.id_type">
            <SelectParameters>
                <asp:QueryStringParameter DefaultValue="1" Name="id" QueryStringField="id" />
            </SelectParameters>
        </asp:SqlDataSource>
    </div>
    <div class="float_r">
        <a href="http://websitebroker.com/websites-for-sale.html" class="button_directory"
            style="margin: 8px 0 0 0;">Go to complete directory</a></div>
    <telerik:RadAjaxManager runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="SidebarContent" runat="server">

    <div class="account">
        <h2>
            My Account</h2>
        <ul>
            <li><a href="myhomepage.aspx">My Websites-Domain</a></li>
            <li><a href="mybid.aspx">My Bibs</a></li>
            <li><a href="mytransaction.aspx">My Transaction</a></li>
            <li><a href="mymessage.aspx">My Messages</a></li>
        </ul>
    </div>
</asp:Content>
